package com.mht2017.common.dto;

import java.util.Set;

public class RegisterResponseDto {

	private int id;
	private String managerHost;
	private int managerPort;
	private String heartbeatUri;
	private long registerTime;
	private Set<IndexTopicDto> indexSet;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Set<IndexTopicDto> getIndexSet() {
		return indexSet;
	}

	public void setIndexSet(Set<IndexTopicDto> indexList) {
		this.indexSet = indexList;
	}

	public String toHeartbeatUrl() {
		return String.format("http://%s:%s%s", managerHost, managerPort, heartbeatUri);
	}

	public String getManagerHost() {
		return managerHost;
	}

	public void setManagerHost(String managerHost) {
		this.managerHost = managerHost;
	}

	public int getManagerPort() {
		return managerPort;
	}

	public void setManagerPort(int managerPort) {
		this.managerPort = managerPort;
	}

	public String getHeartbeatUri() {
		return heartbeatUri;
	}

	public void setHeartbeatUri(String heartbeatUri) {
		this.heartbeatUri = heartbeatUri;
	}

	public long getRegisterTime() {
		return registerTime;
	}

	public void setRegisterTime(long registerTime) {
		this.registerTime = registerTime;
	}

	@Override
	public String toString() {
		return "RegisterResponseDto [id=" + id + ", managerHost=" + managerHost + ", managerPort=" + managerPort + ", heartbeatUri=" + heartbeatUri + ", registerTime=" + registerTime + ", indexSet="
				+ indexSet + "]";
	}

}
